
#nfs共享文件夹的根文件系统的目录
ROOTFS_DIR = /nfs/rootfs
#linux内核目录
KERNEL_DIR = /home/chen/product/linux-3.14

APP_NAME = led_test
MODULE_NAME = plat_led_pdev
MODULE_NAME2 = plat_led_pdrv
CROSS_COMPILE = arm-none-linux-gnueabi-
CC = $(CROSS_COMPILE)gcc

ifeq ($(KERNELRELEASE), )

CUR_DIR = $(shell pwd)


all :
	make -C $(KERNEL_DIR)  M=$(CUR_DIR) modules
	$(CC) $(APP_NAME).c  -o $(APP_NAME)

clean:
	make -C $(KERNEL_DIR)  M=$(CUR_DIR) clean
	rm -rf $(APP_NAME)

install:
	cp -raf *.ko $(APP_NAME)  $(ROOTFS_DIR)/drv_module


else

obj-m += $(MODULE_NAME).o
obj-m += $(MODULE_NAME2).o

endif
